<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2020/1/28
  Time: 18:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>出差申请</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/layui/css/layui.css"  media="all">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<script src="/js/jquery-3.4.1.js"></script>
<script src="/layui/layui.js" charset="utf-8"></script>
<body style="padding: 10px;background-color: rgb(236,240,245);">
    <h1 style="margin-bottom: 20px;">出差申请</h1>
    <!-- 表单区+返回按钮 -->
    <div style="background-color: white;">
        <div class="layui-row">
            <!-- 返回按钮 -->
            <div class="layui-col-xs1" style="padding-left: 10px;padding-top: 10px;">
                <button type="button" class="layui-btn layui-btn-sm layui-btn-normal" onclick="history.go(-1)">
                    <i class="layui-icon layui-icon-left">返回</i>
                </button>
            </div>
        </div>
        <!-- 蓝色分割线 -->
        <hr class="layui-bg-blue">
        <h1 style="text-align: center;margin-bottom: 50px;">出差申请单</h1>
        <form class="layui-form layui-form-pane" action="/newProcess/addProcess.do" style="padding-left: 110px;">
            <input name="process_type" value="evection" style="display: none">
            <!-- 第一排 -->
            <div class="layui-form-item">
                <div class="layui-inline" style="width: 45%">
                    <label class="layui-form-label">标题</label>
                    <div class="layui-input-block">
                        <input name="process_title" required  lay-verify="required" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline" style="width: 45%">
                    <label class="layui-form-label">紧急程度</label>
                    <div class="layui-input-block">
                        <select name="process_status_id" lay-verify="required">
                            <option value=""></option>
                            <c:forEach var="item" items="${process_status}">
                                <option value="${item.status_id}">${item.status_name}</option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
            </div>
            <!-- 第二排 -->
            <div class="layui-form-item">
                <div class="layui-inline" style="width: 45%">
                    <label class="layui-form-label">申请人</label>
                    <div class="layui-input-block">
                        <input value="${user.real_name}" readonly="readonly" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline" style="width: 45%">
                    <label class="layui-form-label">外出类型</label>
                    <div class="layui-input-block">
                        <select name="evection_type">
                            <option value=""></option>
                            <c:forEach var="item" items="${evection_type}">
                                <option value="${item.dictionary_fieldValue}">${item.dictionary_value}</option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
            </div>
            <!-- 第三排 -->
            <div class="layui-form-item">
                <div class="layui-inline" style="width: 45%">
                    <label class="layui-form-label">开始日期</label>
                    <div class="layui-input-block">
                        <input id="start_time" name="start_time" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline" style="width: 45%">
                    <label class="layui-form-label">结束日期</label>
                    <div class="layui-input-block">
                        <input id="end_time" name="end_time" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>
            <!-- 第四排 -->
            <div class="layui-form-item">
                <div class="layui-inline" style="width: 45%;">
                    <label class="layui-form-label">出差原因</label>
                    <textarea name="evection_reason" placeholder="请输入内容" class="layui-textarea"></textarea>
                </div>
                <div class="layui-inline" style="width: 45%;margin-top: -100px;">
                    <label class="layui-form-label">审核人员</label>
                    <div class="layui-input-block">
                        <input name="auditUser_id" class="layui-input" value="${user.manager_id}" style="display: none">
                        <input readonly="readonly" class="layui-input" value="${user.manager_name}">
                    </div>
                </div>
            </div>
            <!-- 功能按钮 -->
            <div class="layui-form-item" style="padding: 15px 0;">
                <div class="layui-inline">
                    <button class="layui-btn" lay-submit lay-filter="submitBtn">保存</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
</body>
<script>
    //form模块
    layui.use(['form','laydate'], function(){
        var form = layui.form;
        var laydate = layui.laydate;

        laydate.render({
            elem: '#start_time' ,//指定元素
            type: 'datetime'
        });
        laydate.render({
            elem: '#end_time' ,//指定元素
            type: 'datetime'
        });
        //监听提交
        form.on('submit(submitBtn)', function(data){
            return true;
        });
    });

</script>
</html>
